ACG LINK
Amazon Elastic Compute Cloud (EC2) is a web service offered by Amazon Web Services (AWS) that provides resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. EC2 allows users to rent virtual servers, known as instances, on which they can run their applications. Here's a detailed description of Amazon EC2, including its features and a configuration example:
Features of Amazon EC2:
-
Instances:
- EC2 provides a variety of instance types optimized for different use cases, such as compute-optimized, memory-optimized, storage-optimized, and GPU instances.
- Instances can run various operating systems, including Amazon Linux, Windows, and others.
- Elastic Load Balancing:
- Distributes incoming application traffic across multiple instances to ensure no single instance is overwhelmed.
- Improves fault tolerance of your applications.
- Auto Scaling:
- Automatically adjusts the number of EC2 instances based on traffic demand or predefined schedules.
- Ensures optimal performance and cost efficiency.
- Amazon Machine Images (AMIs):
- Pre-configured templates for instances, including the operating system and other software.
- Users can create custom AMIs to capture their own configurations.
- Security Groups:
- Acts as a virtual firewall for your instances, controlling inbound and outbound traffic.
- Allows you to specify rules for traffic based on protocols, ports, and source/destination IP addresses.
- Key Pairs:
- Enables secure access to instances using SSH (for Linux instances) or RDP (for Windows instances).
- Users must have the private key to log in securely.
- Elastic Block Store (EBS):
- Provides scalable and persistent block-level storage volumes for use with EC2 instances.
- Can be used for boot volumes or additional data volumes.
- Amazon S3 Integration:
- Instances can access data stored in Amazon Simple Storage Service (S3) for scalable and durable object storage.
- Instance Metadata and User Data:
- Allows instances to access metadata about themselves (e.g., instance ID, public IP) and user-defined data during launch.
- Amazon CloudWatch:
- Monitors the performance of EC2 instances and provides metrics, logs, and alarms.
- Helps in making informed decisions about resource allocation.
- Placement Groups:
- Controls the placement of instances within the AWS infrastructure.
- Can be used to achieve low-latency and high-throughput communication between instances in the same group.
- pot Instances:
- Enables users to bid for unused EC2 capacity at potentially lower costs.
- Ideal for workloads with flexible start and end times.
Configuration Example:
Let's create a basic EC2 instance using the AWS Management Console:
-
Login to AWS Console:
- Launch an EC2 Instance:
- Click on the "EC2" service.
- Click "Launch Instance" to start the instance creation wizard.
- Choose an Amazon Machine Image (AMI):
- Select an AMI based on your requirements (e.g., Amazon Linux 2).
- Choose an Instance Type:
- Select the instance type based on your workload (e.g., t2.micro for a free-tier eligible instance).
- Configure Instance Details:
- Set the number of instances, network settings, and other configurations.
- Optionally, configure advanced settings like user data or IAM roles.
- Add Storage:
- Configure the storage settings for the instance, such as root volume size and additional volumes if needed.
- Add Tags:
- Add key-value tags to the instance for better organization and management.
- Configure Security Group:
- Create or select a security group to control inbound and outbound traffic.
- Review and Launch:
- Review your configuration and click "Launch."
- Key Pair:
- Choose an existing key pair or create a new one for secure instance access.
- Access the Instance:
- Once the instance is running, use the chosen key pair to connect via SSH (for Linux) or RDP (for Windows).